package com.peter.proxy.hkgolden.core;


import com.google.inject.servlet.ServletModule;
import com.peter.framework.service.memcache.CacheService;
import com.peter.framework.service.memcache.GoogleLLCacheService;
import com.peter.framework.service.urlfetch.GoogleLLHttpService;
import com.peter.framework.service.urlfetch.HttpService;
import com.peter.proxy.hkgolden.api.ContentService;
import com.peter.proxy.hkgolden.api.ContentServiceImpl;
import com.peter.proxy.hkgolden.web.TopicServlet;
import com.peter.proxy.hkgolden.web.TopicsServlet;

public class ServletModulePro extends ServletModule {
	@Override
	protected void configureServlets() {
		System.setProperty("http.proxyHost", "proxy.hkcsl.net");
		System.setProperty("http.proxyPort", "8080");

		serve("/showTopics").with(TopicsServlet.class);
		serve("/showMessages").with(TopicServlet.class);

		bind(HttpService.class).to(GoogleLLHttpService.class);
		bind(ContentService.class).to(ContentServiceImpl.class);
		bind(CacheService.class).to(GoogleLLCacheService.class);
	}

}
